# coding:utf-8
import json

from flask import Flask as _Flask
# from flask.json import JSONEncoder as _JSONEncoder

from app.libs.error_code import ServerError
from datetime import date


# class JSONEncoder(_JSONEncoder):
#     def default(self, o):
#         print(o)
#         pass
        # if hasattr(o, 'keys') and hasattr(o, '__getitem__'):
        #     return dict(o)
        # if isinstance(o, date):
        #     return o.strftime('%Y-%m-%d %H:%M:%S')
        # return json.JSONEncoder.default(self, o)
        # raise ServerError()


# class Flask(_Flask):
#     print(_Flask)
#     json_encoder = JSONEncoder
